Children can be expected to act in a childish way.
Note: “Boys will be boys” is often applied to grown men who act childishly.